Integrand size = 32, antiderivative size = 263 \[ \int \left (f+\frac {g}{x}\right )^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=A f^2 x-2 B f g n \log (x) \log \left (1+\frac {b x}{a}\right )+\frac {B f^2 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}+\frac {(b c-a d) g^2 (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{a (c+d x) \left (a-\frac {c (a+b x)}{c+d x}\right )}+2 f g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {B (b c-a d) f^2 n \log (c+d x)}{b d}+2 B f g n \log (x) \log \left (1+\frac {d x}{c}\right )+\frac {B (b c-a d) g^2 n \log \left (a-\frac {c (a+b x)}{c+d x}\right )}{a c}-2 B f g n \operatorname {PolyLog}\left (2,-\frac {b x}{a}\right )+2 B f g n \operatorname {PolyLog}\left (2,-\frac {d x}{c}\right ) \]
A*f^2*x-2*B*f*g*n*ln(x)*ln(1+b*x/a)+B*f^2*(b*x+a)*ln(e*((b*x+a)/(d*x+c))^n )/b+(-a*d+b*c)*g^2*(b*x+a)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/a/(d*x+c)/(a-c* (b*x+a)/(d*x+c))+2*f*g*ln(x)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))-B*(-a*d+b*c)* f^2*n*ln(d*x+c)/b/d+2*B*f*g*n*ln(x)*ln(1+d*x/c)+B*(-a*d+b*c)*g^2*n*ln(a-c* (b*x+a)/(d*x+c))/a/c-2*B*f*g*n*polylog(2,-b*x/a)+2*B*f*g*n*polylog(2,-d*x/ c)
Time = 0.13 (sec) , antiderivative size = 217, normalized size of antiderivative = 0.83 \[ \int \left (f+\frac {g}{x}\right )^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=A f^2 x+\frac {B f^2 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}-\frac {g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{x}+2 f g \log (x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-\frac {B (b c-a d) f^2 n \log (c+d x)}{b d}+\frac {B g^2 n ((b c-a d) \log (x)-b c \log (a+b x)+a d \log (c+d x))}{a c}-2 B f g n \left (\log (x) \left (\log \left (1+\frac {b x}{a}\right )-\log \left (1+\frac {d x}{c}\right )\right )+\operatorname {PolyLog}\left (2,-\frac {b x}{a}\right )-\operatorname {PolyLog}\left (2,-\frac {d x}{c}\right )\right ) \]
A*f^2*x + (B*f^2*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n])/b - (g^2*(A + B *Log[e*((a + b*x)/(c + d*x))^n]))/x + 2*f*g*Log[x]*(A + B*Log[e*((a + b*x) /(c + d*x))^n]) - (B*(b*c - a*d)*f^2*n*Log[c + d*x])/(b*d) + (B*g^2*n*((b* c - a*d)*Log[x] - b*c*Log[a + b*x] + a*d*Log[c + d*x]))/(a*c) - 2*B*f*g*n* (Log[x]*(Log[1 + (b*x)/a] - Log[1 + (d*x)/c]) + PolyLog[2, -((b*x)/a)] - P olyLog[2, -((d*x)/c)])
Time = 0.49 (sec) , antiderivative size = 263, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {3008, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \left (f+\frac {g}{x}\right )^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right ) \, dx\) |
\(\Big \downarrow \) 3008 |
\(\displaystyle \int \left (f^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+\frac {2 f g \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{x}+\frac {g^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{x^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle 2 f g \log (x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+\frac {g^2 (a+b x) (b c-a d) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a (c+d x) \left (a-\frac {c (a+b x)}{c+d x}\right )}+\frac {B f^2 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}-\frac {B f^2 n (b c-a d) \log (c+d x)}{b d}+\frac {B g^2 n (b c-a d) \log \left (a-\frac {c (a+b x)}{c+d x}\right )}{a c}-2 B f g n \operatorname {PolyLog}\left (2,-\frac {b x}{a}\right )-2 B f g n \log (x) \log \left (\frac {b x}{a}+1\right )+A f^2 x+2 B f g n \operatorname {PolyLog}\left (2,-\frac {d x}{c}\right )+2 B f g n \log (x) \log \left (\frac {d x}{c}+1\right )\) |
A*f^2*x - 2*B*f*g*n*Log[x]*Log[1 + (b*x)/a] + (B*f^2*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n])/b + ((b*c - a*d)*g^2*(a + b*x)*(A + B*Log[e*((a + b*x )/(c + d*x))^n]))/(a*(c + d*x)*(a - (c*(a + b*x))/(c + d*x))) + 2*f*g*Log[ x]*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) - (B*(b*c - a*d)*f^2*n*Log[c + d *x])/(b*d) + 2*B*f*g*n*Log[x]*Log[1 + (d*x)/c] + (B*(b*c - a*d)*g^2*n*Log[ a - (c*(a + b*x))/(c + d*x)])/(a*c) - 2*B*f*g*n*PolyLog[2, -((b*x)/a)] + 2 *B*f*g*n*PolyLog[2, -((d*x)/c)]
3.1.2.3.1 Defintions of rubi rules used
Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*(RGx_), x_Symbol] :> With [{u = ExpandIntegrand[(a + b*Log[c*RFx^p])^n, RGx, x]}, Int[u, x] /; SumQ[u ]] /; FreeQ[{a, b, c, p}, x] && RationalFunctionQ[RFx, x] && RationalFuncti onQ[RGx, x] && IGtQ[n, 0]
\[\int \left (f +\frac {g}{x}\right )^{2} \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )d x\]
\[ \int \left (f+\frac {g}{x}\right )^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int { {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )} {\left (f + \frac {g}{x}\right )}^{2} \,d x } \]
integral((A*f^2*x^2 + 2*A*f*g*x + A*g^2 + (B*f^2*x^2 + 2*B*f*g*x + B*g^2)* log(e*((b*x + a)/(d*x + c))^n))/x^2, x)
\[ \int \left (f+\frac {g}{x}\right )^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int \frac {\left (A + B \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}\right ) \left (f x + g\right )^{2}}{x^{2}}\, dx \]
\[ \int \left (f+\frac {g}{x}\right )^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int { {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )} {\left (f + \frac {g}{x}\right )}^{2} \,d x } \]
B*f^2*n*(a*log(b*x + a)/b - c*log(d*x + c)/d) - B*g^2*n*(b*log(b*x + a)/a - d*log(d*x + c)/c - (b*c - a*d)*log(x)/(a*c)) + B*f^2*x*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + A*f^2*x - 2*B*f*g*integrate(-(log((b*x + a)^n) - l og((d*x + c)^n) + log(e))/x, x) + 2*A*f*g*log(x) - B*g^2*log(e*(b*x/(d*x + c) + a/(d*x + c))^n)/x - A*g^2/x
\[ \int \left (f+\frac {g}{x}\right )^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int { {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )} {\left (f + \frac {g}{x}\right )}^{2} \,d x } \]
Timed out. \[ \int \left (f+\frac {g}{x}\right )^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx=\int {\left (f+\frac {g}{x}\right )}^2\,\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right ) \,d x \]